#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

int main(){
	int n;
	cin >> n;
	for(int i = 0;i < n;i++){
		int a = 0,b = 0;
		cin >> a;
		int b1 = 1,b2 = 1,j = 1;
		for(j = 1;j<=a;j++){
			b = b1;
			int temp = b1;
			b1 = b2;
			b2 += temp;
		}
		cout << b << endl;
	} 
	return 0;
}
